<template>
  <div>
    <router-view v-slot="{ Component }">
      <transition mode="out-in" name="el-fade-in-linear">
        <keep-alive :include="routerStore.keepAliveRouters">
          <component :is="Component" />
        </keep-alive>
      </transition>
    </router-view>
  </div>
</template>


<script>
import {getVulBasic} from "@/api/my/loophole/vul";
import {initVulData} from "@/api/my/loophole/init";
import {ElMessage} from "_element-plus@2.2.9@element-plus";

export default {
  name: 'vulnerabilityModule',
  mounted() {
    //初始化漏洞数据
    this.initBasic()
    getVulBasic().then(res => {
      console.log(res)
      window.localStorage.setItem('vul', JSON.stringify(res.data))
    });
  },
  methods: {
    initBasic(){
      initVulData().then(resp => {
        if (resp.code != 0){
          ElMessage.error(resp.mag)
        }
      })
    }
  }
}
</script>
<script setup>
import { useRouterStore } from '@/pinia/modules/router'
const routerStore = useRouterStore()
</script>